/*
 * @Author: WLang
 * @LastEditors: WLang
 * @Description: 
 * @Date: 2023-06-25 14:06:28
 * @LastEditTime: 2023-06-28 22:05:21
 * @FilePath: \my-project\src\router\index.js
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import LayoutView from '../views/LayoutView.vue'
import IndexView from '../views/home/IndexView.vue'
import EquitiesView from '../views/home/EquitiesView.vue'
import CaseView from '../views/home/CaseView.vue'
import NewsView from '../views/home/NewsView.vue'
import AboutUsView from '../views/home/AboutUsView.vue'
import NewsDetail from '../views/home/NewsDetailView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: LayoutView,
    children: [
      {
        path: '/',
        redirect: '/index'
      },
      {
        path: '/index',
        component: IndexView
      },
      {
        path: '/equities',
        component: EquitiesView
      },
      {
        path: '/case',
        component: CaseView
      },
      {
        path: '/news',
        component: NewsView,
      },
        {
          path: 'details/:id',
          name: 'details',
          component: NewsDetail
        },
      {
        path: '/aboutUs',
        component: AboutUsView
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
